package cn.ym.mall.service;

import cn.ym.mall.entity.Contract;
import cn.ym.mall.vo.Page;

import java.sql.SQLException;
import java.util.List;

public interface ContractService {
    /**
     * 分页查询所有合同
     * @param pageNo
     * @param pageSize
     * @return
     * @throws SQLException
     */
    public Page<Contract>  getAll(Integer pageNo, Integer pageSize) throws SQLException;

    /**
     * 添加新合同
     * @param contract
     * @return
     * @throws SQLException
     */
    public boolean add(Contract contract) throws SQLException;

    /**
     * 合同编号查询合同
     * @param coid
     * @return
     * @throws SQLException
     */
    public Contract getContractByCoid(Integer coid) throws SQLException;

    /**
     * 商店编号查询合同
     * @param sid
     * @return
     * @throws SQLException
     */
    public Contract getContractBySid(Integer sid) throws SQLException;
}
